import {createApp} from 'vue'
import ElementPlus from 'element-plus';
import {ElMessage} from 'element-plus';
import 'element-plus/lib/theme-chalk/index.css';
import App from './App.vue'
import router from './router'
import qs from 'qs'
import axios from 'axios'
import VMdEditor from '@kangc/v-md-editor/lib/codemirror-editor';
import '@kangc/v-md-editor/lib/style/codemirror-editor.css';
import githubTheme from '@kangc/v-md-editor/lib/theme/github.js';
import '@kangc/v-md-editor/lib/theme/style/github.css';
import VMdPreview from '@kangc/v-md-editor/lib/preview';

// highlightjs
import hljs from 'highlight.js';

// codemirror 编辑器的相关资源
import Codemirror from 'codemirror';
// mode
import 'codemirror/mode/markdown/markdown';
import 'codemirror/mode/javascript/javascript';
import 'codemirror/mode/css/css';
import 'codemirror/mode/htmlmixed/htmlmixed';
import 'codemirror/mode/vue/vue';
// edit
import 'codemirror/addon/edit/closebrackets';
import 'codemirror/addon/edit/closetag';
import 'codemirror/addon/edit/matchbrackets';
// placeholder
import 'codemirror/addon/display/placeholder';
// active-line
import 'codemirror/addon/selection/active-line';
// scrollbar
import 'codemirror/addon/scroll/simplescrollbars';
import 'codemirror/addon/scroll/simplescrollbars.css';
// style
import 'codemirror/lib/codemirror.css';

VMdEditor.Codemirror = Codemirror;
VMdEditor.use(githubTheme, {
    Hljs: hljs,
});

VMdPreview.use(githubTheme);

const app = createApp(App)
app.use(ElementPlus)
app.use(VMdEditor)
app.use(VMdPreview)
app.use(router)
const college = [
    ['0', '--选择学院，按照学校机构标准选择--'],
    ['402', '经济学院'],
    ['403', '财政税务学院'],
    ['404', '金融学院'],
    ['405', '保险学院'],
    ['406', '国际经贸学院'],
    ['407', '管理科学与工程学院'],
    ['408', '工商管理学院'],
    ['409', '会计学院（MPAcc中心）'],
    ['410', '公共管理学院（MPA中心）'],
    ['411', '法学院'],
    ['412', '马克思主义学院'],
    ['413', '体育学院'],
    ['414', '文学与新闻传播学院'],
    ['415', '外国语学院'],
    ['416', '公共外语教学部'],
    ['417', '数学与数量经济学院'],
    ['418', '统计学院'],
    ['419', '计算机科学与技术学院'],
    ['420', '艺术学院'],
    ['421', '国际商学院'],
    ['422', '国际教育学院（留学生工作办公室）'],
    ['423', '继续教育学院（山东省财政职工大学）'],
    ['424', 'MBA学院'],
    ['426', '商经学院（莱芜校区管理办公室）'],
    ['427', '创新创业教育学院'],
    ['428', '龙山荣誉学院'],
]
const province = [['0', '--请选择--'], ['2', '北京市'], ['3', '天津市'], ['4', '河北省'], ['5', '山西省'], ['6', '内蒙古自治区'], ['7', '辽宁省'], ['8', '吉林省'], ['9', '黑龙江省'], ['10', '上海市'], ['11', '江苏省'], ['12', '浙江省'], ['13', '安徽省'], ['14', '福建省'], ['15', '江西省'], ['16', '山东省'], ['17', '河南省'], ['18', '湖北省'], ['19', '湖南省'], ['20', '广东省'], ['21', '广西壮族自治区'], ['22', '海南省'], ['23', '重庆市'], ['24', '四川省'], ['25', '贵州省'], ['26', '云南省'], ['27', '西藏自治区'], ['28', '陕西省'], ['29', '甘肃省'], ['30', '青海省'], ['31', '宁夏回族自治区'], ['32', '新疆维吾尔自治区'], ['6000', '台湾'], ['7000', '香港'], ['8000', '澳门'], ['9000', '国外']]
axios.defaults.withCredentials = true
app.config.globalProperties.$axios = axios
app.config.globalProperties.$ElMessage = ElMessage
app.config.globalProperties.$college = college
app.config.globalProperties.$province = province
app.config.globalProperties.$qs = qs

app.mount('#app')
